//package com.sansi.bleFloodlight.aspect;
//
//import com.my.httpapi.api.baseUtils.LogUtils;
//
//import org.aspectj.lang.ProceedingJoinPoint;
//import org.aspectj.lang.annotation.Around;
//import org.aspectj.lang.annotation.Aspect;
//import org.aspectj.lang.annotation.Pointcut;
//import org.aspectj.lang.reflect.MethodSignature;
//
///**
// * 自动打印方法的耗时
// */
//@Aspect
//public class TimeLogAspect {
//    @Pointcut("execution(@com.sansi.bleFloodlight.aop.annotation.TimeLog * *(..))")//方法切入点
//    private void methodAnnotated() {
//    }
//
//    @Pointcut("execution(@com.sansi.bleFloodlight.aop.annotation.TimeLog *.new(..))")//构造器切入点
//    private void constructorAnnotated() {
//    }
//
//    @Around("methodAnnotated() || constructorAnnotated()")//在连接点进行方法替换
//    public Object aroundJoinPoint(ProceedingJoinPoint joinPoint) throws Throwable {
//        MethodSignature methodSignature = (MethodSignature) joinPoint.getSignature();
//        String className = methodSignature.getDeclaringType().getSimpleName();
//        String methodName = methodSignature.getName();
//        long startTime = System.currentTimeMillis();
//        Object result = joinPoint.proceed();//执行原方法
//        LogUtils.e((className + "." + methodName + " --->:" + "[" + (System.currentTimeMillis() - startTime) + "毫秒]"));// 打印时间差
//        return result;
//    }
//}
